Necessary global optimality conditions for nonlinear programming problems with polynomial constraints