Fix build on architectures that don't have both cpu clock and __thread