appveyor: put build steps in a script, rather than inline in appveyor.yml