Throw exception inside getLocale()

- instead of __construct, as ext/intl is only needed if no locale is
  explicitly set.