Core: Fix trim in Android<4.1