add type attribute to conditionally included scripts