added some #defines to wrap the deprecated attribute which swig does not support