ugly hack to fix missing main() under OS X