beamer:  added lines to fix table captions with longtable.

Thanks to Joost Kremers.