Raise exception if as_dict=True and column(s) have no names

This is an alternative solution to the issue in #157, suggested by @rsyring.