fix compilation for OS X