adapt to OS X