Deprecated functions replaced.
Compatibility on Windows restored.