core-util: Fix build on mingw32

mingw32 does not have "getuid", so ifdef it properly.

Reported-by: Michael DePaulo <mikedep333@gmail.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>