Fixing the gem build tasks to work on Gems >= 2.0.0 and on Gems <= 2.0.0.