Facebook and Google to pay for journalism