A Compiler for Analysing Cryptographic Protocols Using Non-Interference