Use user agent from .apmrc file

Closes #197