Add callback function to allow resize messages to be sent on mac.