Kinetic simulations of relativistic magnetic reconnection with synchrotron and inverse Compton cooling