fixed compilation errors
add bindings for mac