Only use JDCT_FAST if it is supported in jpeg.

Fixes a bug where jpeg decoder did not work on linux.

Review URL: https://codereview.chromium.org/14188002

git-svn-id: http://skia.googlecode.com/svn/trunk@8661 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 4f32aa9..b3dde47 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -268,11 +268,15 @@
     */
     int sampleSize = this->getSampleSize();
 
+#ifdef DCT_IFAST_SUPPORTED
     if (this->getPreferQualityOverSpeed()) {
         cinfo.dct_method = JDCT_ISLOW;
     } else {
         cinfo.dct_method = JDCT_IFAST;
     }
+#else
+    cinfo.dct_method = JDCT_ISLOW;
+#endif
 
     cinfo.scale_num = 1;
     cinfo.scale_denom = sampleSize;