Chain-length, flexibility and the glass transition of polymers