Fixes for unix builds