build fixes for unix