Since Eleven appears to be meeting her for only the second time (from his perspective) in "The Time of Angels," I'm not sure how this can be reconciled, but it does seem pretty evident that River already knows Ten when she gets to the Library.
I seem to recall that Moffat has said that "The Time of Angels" is
not the Doctor's second adventure with River, so unless the eleventh Doctor had an adventure with River while he was taking the TARDIS for a spin around the moon in "The Eleventh Hour" (which is not how that episode plays), the tenth Doctor must have met up with River at some point before his regeneration.