Crystal structure of molybdopterin synthase and its evolutionary relationship to ubiquitin activation