Check for existence of th before prepending span to trs in mobile view

projectlight.initTables unconditionally prepends the contents of th
elements to table cells in the mobile view. If the table does does have a
thead.th, the function prints "undefined" in the prepended span for every
element of the table. It would be better to check if headerTextArray is
populated before preprending the span.