Pioneer Natural posts second-quarter profit on oil price boo