build fixes for libports