Costco profit surges 39%, beating expectations