Fix handle test on os x