Fixes for MinGW

These changes allow autojump to work on Windows (believe it or not), running under Git Bash and installing with `./install.sh --bash --local`. I've been sitting on this for a while, and I figured I might as well update to the latest version and share it with everyone.