Magnetic phase diagram of CuB2O4