Fix compatibility with redmine 2.4 and later