win32: fix possible memleak if GlobalAlloc() fails

Also remove the unused 'buf' variable.

https://bugzilla.gnome.org/show_bug.cgi?id=694742
GdkScreen: get a long X property correctly

https://bugzilla.gnome.org/show_bug.cgi?id=691426
Signed-off-by: Federico Mena Quintero <federico@gnome.org>