use localhost when possible

To fix this issue: https://github.com/mafintosh/peerflix/issues/136
build