refactor (nw)
fix compile on MSVC 2012 & 2013 [Peter Ferrie]