Compression-induced failure of electroactive polymeric thin films