How to determine optical gaps and voltage losses in organic photovoltaic materials