Mqtt library makes my photon restart?

To update to the latest firmware, you don’t need to build locally. You can put your device in DFU mode, then run

npm install -g particle-cli
particle update

That will install 0.4.4 to your device.

The build problem is that you don’t have needed tools in your path. The Toolchain for Windows Installer is the simplest way to get started.