small update to make code run also on mac

controlling netlogo on the mac now works, but only in headless mode.
The code here has been tested on both windows 7 and mac os x mavericks.