Redmine 2.1 compatibility

Hi,

benasher44 commited Redmine 2.0 compatibiliy patches. And I added 2.1 compatibility. So I suggest you pull his work in the original repository.

Thanks to both for your work