Added some defines for code to becakwards compatible