small fix on front

js_footer and js_header can contain other things than string, such as array for inline javascript...

Therefore array_diff doesn't work properly on this case and will throw warnings for php 5.4.

I found a solution working on my project but I am not sure that this is the best solution.