Fixing build errors and warnings in release mode
Header for dealing with amq versions difference