tweak linker settings to link correctly on OSX, fix __init__