[Fix] a crash on iOS 6 due to background tasks management

Signed-off-by: Miguel M. Almeida <miguelcma@gmail.com>