Configurational temperature for systems with constraints