Use cl-flet instead of flet in Emacs version >= 24.3

In version of Emacs above 24.3, you get a deprecation warning for flet (deprecated in 24.3). I simply added an if statement to use cl-flet instead for 24.3 and up.