Oil prices extended gains after data showed U.S. commercial crude oil inventories increased less than expected.