Securing Statically And Dynamically Compiled Programs Using Software Diversity