Fix vagrant port error

The way the port config code evaluated confused Vagrant (aka it didn't
work). This changes it up a bit and allows it to be reused further down
in the Vagrant config.