Use correct getopt syntax for Mac and Linux respectively. Fix #8.