The origin of X-ray emission in the gamma-ray emitting narrow-line Seyfert 1 1H 0323+342