make this work on OmniOS, need the CPPFLAGS and to use the openlibs API