fix https://issues.apache.org/jira/browse/AMQCPP-520