fix int conversion warning, using LD32/ST32
use active SPS parameters instead of other SPS.
Merge pull request #345 from licaiguo/fix-int-conversion-warning

fix int conversion warning, using LD32/ST32
Merge pull request #347 from huili2/active_sps_ref_size

use active SPS parameters instead of other SPS.
Use -dynamiclib instead of -shared for building shared libraries on OS X

Older toolchains don't recognize the -shared parameter.
Merge pull request #348 from mstorsjo/darwin-dylib

Use -dynamiclib instead of -shared for building shared libraries on OS X