Learning a Better Control Barrier Function