Bayesian Inverse Reinforcement Learning for Non-Markovian Rewards