Fix amqp build error. Closes #688