Fixing warnings in utils/metadata when building under Windows/Cygwin

Builds under Cygwin and Linux with these changes
Sounds sensible. Where would be an appropriate place to conditionally define those?