Fix problem when building amq