In general, it's one of the few things that I consider to be real nasty of the GPL. What makes it worse is how contagious it can be. Still, there is a way to get around it.
First, start by defining your own interface to send over data. This will be used between your application and a separate library that you will be creating. Don't re-use anything from the GPL code because that would fall under the GPL license. However, there's nothing wrong with using a similar structure.
Since this interface is your own creation, it would fall under your own license. You're free to use it any way you like.
Next, create a wrapper library around the GPL code which will also implement your personal interface. This library would fall under the GPL license and thus it gets contaminated. However, although it would expose your interface to the outside world, your interface cannot be contaminated. It's not derived or whatever. It's 100% your own code and you could use the same interface to connect to a different library.
This wrapper library will serve as a protection buffer between your own propriety code and the GPL code. Your own code would never be GPL since it's not using any GPL code directly. The interface will also serve as a solution to change the GPL code by a different solution.
It is a trick to get around the license restriction but since the interface is yours and yours only, the GPL will be blocked by it. THE GPL code and non-GPL code would be two different programs if used this way.
Still, be aware that you might need some legal advise here. There aren't many lawyers here at SO. But it is a trick that can get around this GPL license.