Judge grants preliminary approval in BP settlement