WIP/BUG: temporary fix for linux problem where dynamic_cast in ReadTransform (in ANTs) fails when called from R