extract old vagrant version compatibility code into util method