Sensitive measurement of optical nonlinearity using an absorptive phase object