make compilable on OS X