A structural study and its relation to dynamic heterogeneity in a polymer glass former