Add slightly more complicated stackbrew versioning logic to account for 5.7