Fix to work with Windows CE. Thanks to jmichiel for the fix