Ground-state properties of a Bose-Einstein condensate in an optomechanical cavity