Add support for windows

Fixes #12. All the credit to @ckken.