--- HGUtils.m.orig
+++ HGUtils.m
@@ -29,6 +29,10 @@
 
 #import "HGUtils.h"
 
+#if __has_include(<Availability.h>)
+#include <Availability.h>
+#endif
+
 
 NSString *stringFromFileSize(long long aSize)
 {
@@ -37,11 +41,13 @@ NSString *stringFromFileSize(long long aSize)
     // Finder uses SI prefixes for file sizes and disk capacities
     // (since Snow Leopard) so we'll do the same here.
     //
+#if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && defined(__MAC_10_8) && __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_8
     if (NSClassFromString(@"NSByteCountFormatter")) {
         return [NSByteCountFormatter
             stringFromByteCount: aSize
             countStyle: NSByteCountFormatterCountStyleFile];
     }
+#endif
     
     CGFloat kilo = 1000.0;
     
