implement autostart support for osx