Detection of X-ray photons by solution-processed lead halide perovskites