fiddle with the internal API a bit to work on OSX(...?)

This was working fine, but testing on my macbook I got an error. Seems
to work fine if I assume the init target argument is the module. Not
sure if it will work on Linux though. Guess I'll find out!