More macosx compat things

Are nedded to pass more tests on jenkins

http://gresil.org/jenkins/job/CI%20Github%20OSX/