fix reflection error by making onClose method accessible from OSXAdapter

fixes issue 133