Comparison of electronic energy loss in graphene and BN sheet by means of time-dependent density functional theory