Fixed linking problem, added change from unix version.