CSS3 fix for ie8 (updated)

I recently had a problem with CSS3 Pie, effects were being applied to the homepage but none of the subsequent pages. It took an age to work out but in the end the solution was this:

[php]
<!–[if lt IE 9]>
<style type="text/css">
#wrapper {
behavior: url(<?php bloginfo(‘template_directory’); ?>/pie/PIE.htc);
}
</style>
<![endif]–>
[/php]

Instead of using a stylesheet to call the behaviour as in the previous post pop a conditional statement inside the header.