Oil prices trim gains after big build in U.S. stocks